package com.lantosec.hmrp.modules.archives.entity;

import com.lantosec.hmrp.core.mvc.BaseEntity;
import com.lantosec.hmrp.modules.archives.vo.UserQualificationVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

/**
 * <p>
 * 执业资格信息表 实体类
 * </p>
 *
 * @author AutoCode
 * @since 2020-07-13
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserQualification extends BaseEntity<UserQualificationVO> {

    private static final long serialVersionUID = 1L;
    public UserQualification(UserQualificationVO vo){
        this.userQualificationId = vo.getUserQualificationId();
        this.userId = vo.getUserId();
        this.qualificationName = vo.getQualificationName();
        this.qualificationLevel = vo.getQualificationLevel();
        this.qualificationStart = vo.getQualificationStart();
        this.qualificationEnd = vo.getQualificationEnd();
        this.remark = vo.getRemark();
        this.photos = vo.getPhotos();
    }

    @Override
    public UserQualificationVO convertToVO(){
        return new UserQualificationVO(this);
    }


    /**
     * 主键ID
     */
    @TableId(value = "user_qualification_id", type = IdType.ASSIGN_UUID)
    private String userQualificationId;

    /**
     * user主表ID
     */
    private String userId;

    /**
     * 资格名称
     */
    private String qualificationName;

    /**
     * 等级
     */
    private String qualificationLevel;

    /**
     * 证书取得时间
     */
    private String qualificationStart;

    /**
     * 证书有效期限
     */
    private String qualificationEnd;

    /**
     * 备注
     */
    private String remark;

    /**
     * 附件
     */
    private String photos;


    public enum ColName {
        user_qualification_id, user_id, qualification_name, qualification_level, qualification_start, qualification_end, remark, photos, 
    }
}
